Telegram Group & Telegram Channel
Если у вас есть массив, в каждом элементе которого есть computed, то лучше создать один на весь массив, чем много для каждого элемента

// Bad
const rows = productRows.map(row => ({
...row,
total: computed(() => row.price * row.qty),
}));


// Good
const computedRows = computed(() =>
productRows.map(row => ({
...row,
total: row.price * row.qty,
}))
);


#tip #performance #reactivity



tg-me.com/vuefaq/1165
Create:
Last Update:

Если у вас есть массив, в каждом элементе которого есть computed, то лучше создать один на весь массив, чем много для каждого элемента

// Bad
const rows = productRows.map(row => ({
...row,
total: computed(() => row.price * row.qty),
}));


// Good
const computedRows = computed(() =>
productRows.map(row => ({
...row,
total: row.price * row.qty,
}))
);


#tip #performance #reactivity

BY Vue-FAQ




Share with your friend now:
tg-me.com/vuefaq/1165

View MORE
Open in Telegram


Vue FAQ Telegram | DID YOU KNOW?

Date: |

The Singapore stock market has alternated between positive and negative finishes through the last five trading days since the end of the two-day winning streak in which it had added more than a dozen points or 0.4 percent. The Straits Times Index now sits just above the 3,060-point plateau and it's likely to see a narrow trading range on Monday.

Telegram announces Search Filters

With the help of the Search Filters option, users can now filter search results by type. They can do that by using the new tabs: Media, Links, Files and others. Searches can be done based on the particular time period like by typing in the date or even “Yesterday”. If users type in the name of a person, group, channel or bot, an extra filter will be applied to the searches.

Vue FAQ from fr


Telegram Vue-FAQ
FROM USA